<?php
/**
 * Created by PhpStorm.
 * User: mashi
 * Date: 2015/5/9
 * Time: 20:18
 */

require_once('config.php');
$domain=$_SERVER['SERVER_NAME'];
$redirect_uri = urldecode('http://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')) . '/oauth.php');
header('location:https://open.weixin.qq.com/connect/oauth2/authorize?appid='.APPID.'&redirect_uri='.$redirect_uri.'&response_type=code&scope=snsapi_base&state=29&connect_redirect=1#wechat_redirect');
